﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WestJourney.Properties;
using System.Configuration;

namespace WestJourney
{
    public partial class SettingForm : Form
    {
        public SettingForm()
        {
            InitializeComponent();
        }

        private void buttonSave_Click(object sender, EventArgs e)
        {
            Settings.Default.Users = this.textBoxUsers.Text;
            Settings.Default.UseComputer = this.checkBoxUseComputer.Checked;

            Settings.Default.Save();
        }

        private void SettingForm_Load(object sender, EventArgs e)
        {
            this.LoadInformation();
        }

        private void LoadInformation()
        {
            string users = Settings.Default.Users;
            bool userComputer = Settings.Default.UseComputer;

            this.textBoxUsers.Text = users;
            this.checkBoxUseComputer.Checked = userComputer;
        }

        private void buttonCanel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }
    }
}
